home *** CD-ROM | disk | FTP | other *** search
/ NOVA - For the NeXT Workstation / NOVA - For the NeXT Workstation.iso / SourceCode / MiniExamples / AskMe / ClockView.h < prev    next >
Text File  |  1991-05-06  |  1KB  |  50 lines

  1. /* ClockView.h, a simple clock view 
  2.  * Author: Ali T. Ozer, NeXT Developer Support Group
  3.  * Created: May 26, 1989 (for version 0.9)
  4.  * Modified: June 14 and Aug 14, 1989 (for version 1.0)
  5.  * Redesigned for 2.0 by Julie Zelenski, NeXT Developer Support Group
  6.  * Adapted by Mai Nguyen for this mini-example. Basically, only the digital
  7.  * view of the clock is being used.
  8.  *
  9.  * Subclass of view to implement a simple clock. This view is pretty generic 
  10.  * and can probably be added to any program. 
  11.  * You may freely copy, distribute and reuse the code in this example.  
  12.  * NeXT disclaims any warranty of any kind, expressed or implied, as to its 
  13.  * fitness for any particular use.
  14.  */
  15.  
  16.  
  17. #import <appkit/View.h>
  18. #import <dpsclient/dpsclient.h>  
  19. #import <objc/typedstream.h> 
  20.  
  21. @interface ClockView:View
  22. {
  23.   DPSTimedEntry teNum;         /* The clock timed entry */
  24.   id cacheWindow;        /* Offscreen cache window for clock face */
  25.   float radius;          /* Radius of clock face */
  26.   NXPoint center;        /* Center of clock face */
  27.   BOOL showSeconds;              /* Show seconds hand on clock */
  28.   BOOL needRedraw;        /* boolean flag to indicate redraw is needed */
  29.   id littleFont,mediumFont, bigFont;    /* fonts used */
  30.   
  31. }
  32.  
  33. /* INIT/FREE METHODS */
  34. - initFrame:(const NXRect *)frameRect;
  35. - free;
  36.  
  37.  
  38. /* PRIVATE METHODS */
  39. - drawFace;
  40. - drawDigital:(struct tm *)time;
  41. - drawSelf:(NXRect *)rects :(int)rectCount;
  42.  
  43. - startTimedEntry:(BOOL)fireASAP;
  44. - stopTimedEntry;
  45. - sizeTo:(NXCoord)w :(NXCoord)h;
  46.  
  47.  
  48.  
  49. @end
  50.